package com.xiaowu.xblog.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xiaowu.xblog.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Schema(description = "文章实体")
@Data
@TableName("article")
public class Article extends BaseEntity {

    @Override
    public Long getId() {
        return super.getId();
    }

    @Schema(description = "文章标题")
    private String title;

    @Schema(description = "文章内容")
    private String content;

    @Schema(description = "文章摘要")
    private String summary;

    @Schema(description = "封面图 URL")
    private String coverUrl;

    @Schema(description = "是否置顶")
    private Boolean isTop;

    @Schema(description = "是否发布")
    private Boolean isPublished;

    @Schema(description = "浏览量")
    private Integer viewCount;

    @Schema(description = "点赞数")
    private Integer likeCount;

    @Schema(description = "评论数")
    private Integer commentCount;

    @Schema(description = "作者 ID")
    private Long authorId;

    @Schema(description = "分类 ID")
    private Long categoryId;
}
